package com.pinghua.mocha.basics.enumerate.fwct;

import com.coffee.core.CoffeeEnum;

public enum WarningStatusEnum implements CoffeeEnum<Integer> {

    TYPE_NOT_CONFIRM(0,"待确认"),

    TYPE_NOT_RECEIVED(10,"待接收"),

    TYPE_DEALING(20,"处理中"),

    TYPE_FINISH(30,"已解决"),

    TYPE_NOT_FINISH(40,"未解决"),

    TYPE_INFO_PROCESS_ENDED_SOLVED(50,"结案已解决"),

    TYPE_INFO_PROCESS_NOT_SOLVED_ENDED(60,"结案未解决"),

    TYPE_TRANSFER(70,"转派");
    private final Integer code;
    private final String label;

    WarningStatusEnum(Integer code, String label) {
        this.code = code;
        this.label = label;
    }

    @Override
    public Integer code() {
        return this.code;
    }

    @Override
    public String label() {
        return this.label;
    }


    public static WarningStatusEnum ofCode(Integer code) {
        for (WarningStatusEnum type : values()) {
            if (type.code.equals(code)) {
                return type;
            }
        }
        return null;
    }
}
